<!DOCTYPE html>

<html class="theme-next use-motion" lang="zh-Hans" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="~{theme/next/layout}">
<head>
    <meta name="generator" content="Hexo 3.8.0">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="theme-color" content="#222">
    <meta http-equiv="Cache-Control" content="no-transform">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <title>首页 | [[${#servletContext.getAttribute('configMap')['blog_author']}]]</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

<div layout:fragment="content">
    <div id="content" class="content">

        <section id="posts" class="posts-expand">
            <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article" th:each="post : ${pageInfo.data}">
                <div class="post-block">
                    <link itemprop="mainEntityOfPage" th:href="@{${post.link}}">
                    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
                      <meta itemprop="name" th:content="${#servletContext.getAttribute('configMap')['blog_author']}">
                      <meta itemprop="description" content>
                    </span>

                    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
                      <meta itemprop="name" content="Hexo-Boot">
                    </span>

                    <header class="post-header">

                        <h1 class="post-title" itemprop="name headline">
                            <a class="post-title-link" th:href="@{'/'+${post.link}}" itemprop="url">
                                <div class="flag" th:if="${post.reprint == false}">原创</div>
                                <div class="flag" th:if="${post.reprint == true}">转载</div>
                                [[${post.title}]]
                            </a>
                        </h1>

                        <div class="post-meta">
                          <span class="post-time">
                              <span class="post-meta-item-icon">
                                <i class="fa fa-calendar-o"></i>
                              </span>
                              <span class="post-meta-item-text">发表于</span>
                              <time title="创建于" itemprop="dateCreated datePublished" th:datetime="${post.publishDate}"
                                    th:text="${post.year} + '-' + ${post.month} + '-' + ${post.day}"></time>
                          </span>

                            <span class="post-category">
                              <span class="post-meta-divider">|</span>
                              <span class="post-meta-item-icon">
                                <i class="fa fa-folder-o"></i>
                              </span>
                                <span class="post-meta-item-text">分类于</span>
                                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                                  <a th:href="@{'/categories/'+${post.categoryName}+'/'}" itemprop="url" rel="index">
                                    <span itemprop="name" th:text="${post.categoryName}"></span>
                                  </a>
                                </span>
                            </span>

                            <span class="post-category">
                              <span class="post-meta-divider">|</span>
                              <span class="post-meta-item-icon">
                                <i class="fa fa-eye"></i>
                              </span>
                                <span class="post-meta-item-text">阅读数</span>
                                <span itemprop="name" itemscope itemtype="http://schema.org/Thing" th:text="${post.readNum}">0</span>
                            </span>
                        </div>
                    </header>


                    <div class="post-body" itemprop="articleBody">
                        <div th:utext="${md.md2html(post.id, post.summaryHtml, 1)}"></div>
                        <!--noindex-->
                        <div class="post-button text-center">
                            <a class="btn" th:href="@{'/'+${post.link} + '#more'}" rel="contents">
                                阅读全文 &raquo;
                            </a>
                        </div>
                        <!--/noindex-->
                    </div>
                    <footer class="post-footer">
                        <div class="post-eof"></div>
                    </footer>
                </div>

            </article>
        </section>


        <nav class="pagination">
            <span th:if="${pageInfo.hasPreviousPage}">
                <a class="extend prev" rel="prev" th:href="@{${pageInfo.pageNum-1} == 1 ? '/' : '/page/' + ${pageInfo.pageNum-1}+'/'}" ><i class="fa fa-angle-left"></i></a>
            </span>
            <span th:each="pageNum : ${pageInfo.navigatepageNums}">
                <span th:if="${pageNum == pageInfo.pageNum}">
                    <span class="page-number current" th:text="${pageNum}">1</span>
                </span>
                <span th:if="${pageNum != pageInfo.pageNum}">
                    <a class="page-number" th:href="@{'/page/' + ${pageNum}+'/'}" th:text="${pageNum}"></a>
                </span>
            </span>
            <span th:if="${pageInfo.hasNextPage}">
                <a class="extend next" rel="next" th:href="@{'/page/' + ${pageInfo.pageNum+1}+'/'}" ><i class="fa fa-angle-right"></i></a>
            </span>
        </nav>

    </div>
</div>
</body>
</html>
